#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("remove.in" , "r" , stdin);
	freopen("remove.out" , "w" , stdout);
	int n , h[105] , x;
	cin >> n;
	for(int i = 1 ; i <= n ; i++){
		cin >> h[i];
	}
	cin >> x;
	for(int i = 1 ; i <= n ; i++){
		if(i == x){
			continue;
		}
		cout << h[i] << " ";
	}
	return 0;
}